VCPKG_DIR = C:/vcpkg/

SOURCES += $$PWD/convert.cpp \
    $$PWD/TemplateMatch.cpp \
    $$PWD/matUtils.cpp \
    $$PWD/plinesfit_opencv.cpp


HEADERS += $$PWD/convert.h \
    $$PWD/TemplateMatch.h \
    $$PWD/matUtils.h \
    $$PWD/plinesfit_opencv.h

win32{
        contains(QT_ARCH, i386) {
        message("OpenCV 4 support code 32-bit")
                INCLUDEPATH += $$VCPKG_DIR/installed/x86-windows/include
                DEPENDPATH += $$VCPKG_DIR/installed/x86-windows/bin
        CONFIG(release, debug|release): LIBS += -L$$VCPKG_DIR/installed/x86-windows/lib  \
                                                            -lopencv_core4  \
                                                            -lopencv_highgui4  \
                                                            -lopencv_imgproc4  \
                                                            -lopencv_imgcodecs4 \
                                                            -lopencv_videoio4 \
                                                            #-lopencv_features2d4\
                                                            #-lopencv_ml4 \
                                                            #-lopencv_objdetect4  \
                                                            #-lopencv_photo4  \
                                                            #-lopencv_stitching4  \
                                                            #-lopencv_superres4 \
                                                            -lopencv_video4  \
                                                            #-lopencv_videostab4  \
                                                            #-lopencv_calib3d4  \
                                                            #-lopencv_flann4

                else:CONFIG(debug, debug|release): LIBS += -L$$VCPKG_DIR/installed/x86-windows/debug/lib \
                                                            -lopencv_core4d  \
                                                            -lopencv_highgui4d \
                                                            -lopencv_imgproc4d \
                                                            -lopencv_imgcodecs4d   \
                                                            -lopencv_videoio4d \
                                                            #-lopencv_features2d4d\
                                                            #-lopencv_ml4d \
                                                            #-lopencv_objdetect4d  \
                                                            #-lopencv_photo4d  \
                                                            #-lopencv_stitching4d  \
                                                            #-lopencv_superres4d  \
                                                            -lopencv_video4d  \
                                                            #-lopencv_videostab4d \
                                                            #-lopencv_calib3d4d \
                                                            #-lopencv_flann4d
    } else {
        message("OpenCV 4 support code 64-bit")
                INCLUDEPATH += $$VCPKG_DIR/installed/x64-windows/include
                DEPENDPATH += $$VCPKG_DIR/installed/x64-windows/bin
        CONFIG(release, debug|release): LIBS += -L$$VCPKG_DIR/installed/x64-windows/lib  \
                                                            -lopencv_core4  \
                                                            -lopencv_highgui4  \
                                                            -lopencv_imgproc4  \
                                                            -lopencv_imgcodecs4 \
                                                            -lopencv_videoio4 \
                                                            #-lopencv_features2d4\
                                                            #-lopencv_ml4 \
                                                            #-lopencv_objdetect4  \
                                                            #-lopencv_photo4  \
                                                            #-lopencv_stitching4  \
                                                            #-lopencv_superres4 \
                                                            -lopencv_video4  \
                                                            #-lopencv_videostab4  \
                                                            #-lopencv_calib3d4  \
                                                            #-lopencv_flann4

                else:CONFIG(debug, debug|release): LIBS += -L$$VCPKG_DIR/installed/x64-windows/debug/lib \
                                                            -lopencv_core4d  \
                                                            -lopencv_highgui4d \
                                                            -lopencv_imgproc4d \
                                                            -lopencv_imgcodecs4d   \
                                                            -lopencv_videoio4d \
                                                            #-lopencv_features2d4d\
                                                            #-lopencv_ml4d \
                                                            #-lopencv_objdetect4d  \
                                                            #-lopencv_photo4d  \
                                                            #-lopencv_stitching4d \
                                                            #-lopencv_superres4d  \
                                                            -lopencv_video4d  \
                                                            #-lopencv_videostab4d \
                                                            #-lopencv_calib3d4d \
                                                            #-lopencv_flann4d
        # message($$LIBS)
    }
}

